package com.erp.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.erp.dao.TimeOffDAO;
import com.erp.domain.TTimeOff;
import com.erp.dto.TimeOff;

@Service(value = "timeOffService")
@Transactional
public class TimeOffService {

	@Resource(name = "timeOffDAO")
	TimeOffDAO timeOffDAO;

	public Integer add(TimeOff timeOff) {
		return (Integer) timeOffDAO.save(new TTimeOff(timeOff));
	}

	public TimeOff getById(Integer formId) {
		return new TimeOff(timeOffDAO.getById(formId));
	}
}
